<me:SDBASE x:Class="WPFExcelReport.TSSD0178"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                     xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"     
                     xmlns:ex="clr-namespace:WPFExcelReport.Controls;assembly=ExControls"
                    xmlns:me="clr-namespace:WPFExcelReport" 
                     xmlns:Localization="clr-namespace:Localization;assembly=Localization"
                    Background="White"  
                    x:Name="TV"
                    Loaded="Window_Loaded"
     >
    <me:SDBASE.Resources>
        <CollectionViewSource  x:Key="vwMaster"/>       <CollectionViewSource  x:Key="vwDetail"/>
        <ucd:BoolToVisibilityConverter  x:Key="bv"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
    </me:SDBASE.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="1*"></RowDefinition>
        </Grid.RowDefinitions>
        <WrapPanel>
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=品种组:}}"></TextBlock>
                <Button  Grid.Column="1" Click="ManageCommand" Width="12" Height="20" HorizontalAlignment="Left" Visibility="{Binding IsMaster,Converter={StaticResource bv}}" >
                    <Button.Background>
                        <ImageBrush  ImageSource="/ImagePackage;component/Images/Extend.png" />
                    </Button.Background>
                </Button>
            </Grid>
            <ComboBox    DropDownOpened="ComboBox_DropDownOpened" 
                        IsEditable="True"
                        Width="80"
                        MinWidth="40"
                    SelectedValuePath="KEY"
                     DisplayMemberPath="DES"
                      ItemsSource="{Binding Source={StaticResource ResourceKey=vwMaster}}" 
                    IsSynchronizedWithCurrentItem="True" 
                        ScrollViewer.HorizontalScrollBarVisibility="Visible"
                        >
            </ComboBox>
        </WrapPanel>
    </Grid>
</me:SDBASE>
